# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.
#
# This PKGBUILD file was initially retrieved from AUR and all credits goes to:
# Maintainer: Tilman Blumenbach <tilman [AT] ax86 [DOT] net>

pkgname=terminus-font-ttf
_pkgname=terminus-ttf
pkgver=4.49.3
pkgrel=1
pkgdesc='Monospaced bitmap font designed for long work with computers (TTF version, mainly for Java applications).'
arch=('any')
url='https://files.ax86.net/terminus-ttf'
license=('custom:OFL')
depends=('fontconfig' 'xorg-mkfontdir')
source=("https://files.ax86.net/$_pkgname/files/$pkgver/$_pkgname-$pkgver.zip")
sha512sums=('32a5e5d9fc3d068447afb5b38a6183fcc012d17bccad37116a8f508d4b1bf5a5b3d1a71cff0d750cba83fd2622c3917402358236562886456692928c62f6307f')
install="$pkgname.install"

package() {
  cd "$_pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/fonts/TTF"

  for i in *.ttf; do
    destname="$(echo "$i" | sed -E 's|-[[:digit:].]+\.ttf$|.ttf|')"
    install -Dm 644 "$i" "$pkgdir/usr/share/fonts/TTF/$destname"
  done

  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

